             package com.java.diagnostics.visualizer.recommender.switchToBalanced;
             
             import com.java.diagnostics.visualizer.data.AggregateData;
             import com.java.diagnostics.visualizer.data.DataPoint;
             import com.java.diagnostics.visualizer.data.TupleData;
             import com.java.diagnostics.visualizer.parser.vgc.constants.VGCGCScopes;
             import com.java.diagnostics.visualizer.recommender.Recommendation;
             import com.java.diagnostics.visualizer.recommender.RecommendationBase;
             import com.java.diagnostics.visualizer.recommender.util.RecommendationLabels;
             import java.text.MessageFormat;
             
             public class LookForGCPercolated
               extends RecommendationBase
               implements Recommendation
             {
               public void recommend(AggregateData data)
               {
                 Object gcMode = getGCMode(data);
                 
                 if (("gencon".equals(gcMode)) && (is26VM(data))) {
                   TupleData gcPercolated = data.getTupleData("VGCLabels.gc.percolated");
                   TupleData scopeRecord = data
                     .getTupleData("VGCLabels.gc.scopes");
                   
                   if ((gcPercolated != null) && (scopeRecord != null)) {
                     double percolates = gcPercolated.length();
                     DataPoint[] scopePoints = scopeRecord.getDataPoints();
                     
                     double nurseryCollects = 0.0D;
                     for (DataPoint scope : scopePoints) {
                       if (scope.getRawY() == VGCGCScopes.SCAVENGE_INT) {
                         nurseryCollects += 1.0D;
                       }
                     }
                     long percent = Math.round(percolates / (
                       nurseryCollects + percolates) * 100.0D);
                     if (percent > 5L) {
                       addWarning(data, MessageFormat.format(
                         RecommendationLabels.GC_PERCOLATED, 
                         new Object[] { Long.valueOf(percent) }));
                     }
                   }
                 }
               }
             }


